
#ifndef _MEMBER_BSURFACE_H_
#define _MEMBER_BSURFACE_H_

#include <BSurface>

#define surface_member(surface)		((member_BSurface*)((BSurface*)surface)->_ptr)

namespace BWE
{
	class member_BSurface
	{
	public:
		member_BSurface(BSurface* surface);
		~member_BSurface();

		bool rebuildHorizontal();
		bool rebuildVertical();

		BSurface*		boss;
		BQuad			quad;
		BVectorArray	edges;
		Orientation		orientation;
		int				verticalSegment;
		int				horizontalSegment;
		bool			dirty;

		BHolder<BVectorArray>		vertices;
		BHolder<BVectorArray>		normals;
		BHolder<BColorArray>		colors;
		BHolder<BCoordArray>		coords;
		BHolder<BIndexArray>		indices;

	};
}

#endif